Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to hide a page from a NoUIOption #20

Closed
jrblanchette opened this issue Apr 8, 2024 · 2 comments
Closed

Unable to hide a page from a NoUIOption #20

jrblanchette opened this issue Apr 8, 2024 · 2 comments

Comments

@jrblanchette
Copy link

Hello,

First, I want to thank you for this wonderful tool. I've only recently started using TsGui but it is clearly very powerful and I'm excited to incorporate it into my SCCM task sequences.

I've hit a small issue though. I would like to hide or show a page depending on the value of a task sequence variable. I figured I could use a toggle inside a NoUIOption to achieve this. If I try to hide a GuiOption using this method, this works perfectly fine. For example, to hide a heading on page 2 unless the machine is a laptop:

<TsGui LiveData="TRUE" Output="ConfigMgr" PurgeInactive="TRUE">
	<Height>330</Height>
	<Width>550</Width>

	<HardwareEval />

	<Page>
		<Row>
			<Column>
				<GuiOption Type="Heading">				
					<Label>Page 1</Label>
					<Bold />
				</GuiOption>
			</Column>
		</Row>
	</Page>

	<Page>
		<Row>
			<Column>
				<GuiOption Type="Heading">
					<Group>Group_Hide</Group>
				
					<Label>Page 2</Label>
					<Bold />
				</GuiOption>
			</Column>
		</Row>
	</Page>
	
	<NoUI>
		<NoUIOption>
			<Variable>Toggle_Hide</Variable>
			<SetValue>
				<Query Type="EnvironmentVariable">
					<Variable Name="TsGui_IsLaptop" />
				</Query>
			</SetValue>
			
			<Toggle Group="Group_Hide">
				<Enabled>TRUE</Enabled>
				<Disabled>FALSE</Disabled>
				<Hide />
			</Toggle>
		</NoUIOption>
	</NoUI>
</TsGui>

However, if I move the group under the Page tag instead, I get an exception when running TsGui:

...
<Page>
	<Group>Group_Hide</Group>
	
	<Row>
		<Column>
			<GuiOption Type="Heading">
				<Label>Page 2</Label>
				<Bold />
			</GuiOption>
		</Column>
	</Row>
</Page>
...

TsGui Exception

I'm using the latest 2.0.22.0 version.

Thanks in advance!

@MikePohatu
Copy link
Owner

Thanks for the bug report. Will take a look.

@MikePohatu
Copy link
Owner

Fixed in 2.0.23.0 up on website now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants